#coding:utf-8
import pygtk
pygtk.require('2.0')
import gtk
from winit import winit

class MyWindow(winit):
    def __init__(self, title, width, height):
        winit.__init__(self, title, width, height)

        vbox = gtk.VBox(False, 5)
        swindow = gtk.ScrolledWindow()
        text = gtk.TextView()
        textbuffer = text.get_buffer()
        swindow.add(text)
        swindow.show()
        vbox.pack_start(swindow)
        text.show()
        self.window.add(vbox)
        vbox.show()
        self.window.show()

    def main(self):
        gtk.main()

window = MyWindow('PyGTK', 300, 200)
window.main()
